spark_find_library(python11 REQUIRED python-3.11 python-3.11-embed)

add_library(hello_py SHARED iq_impl_bridge.cpp)
target_link_python11(hello_py)

set_target_properties(hello_py 
    PROPERTIES 
        LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/plugins/
        RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/plugins/
        ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/plugins/)

add_custom_command(TARGET hello_py
    POST_BUILD
        COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/*.py ${CMAKE_BINARY_DIR}/plugins/
)